Repository navigation
Learning page shows whether each loop still learns; run page shows a held draft and a GitHub wait - #332
Merged
Conversation
…raft and a GitHub wait show on the run page The Learning page opens with one card per learning loop (GET /api/learning/health): what it learns from, when it last learned, its count this week against what should have fed it, and for a loop that went quiet, a red state with what to check. A finished run whose pull request stays a draft (draft_hold) reads "Finished, PR held" in its status and at the top of the run page, with the summary and each reason with what to do. A working run waiting out GitHub's hourly limit (github_wait) says when it goes on and that nothing is needed. The API field list is regenerated at the platform commit that adds draft_hold.
…at platform main Each learning loop's title comes from its id in plain words, Coderhelm spelling, and the API's name strings are never shown. An id the dashboard doesn't know reads as its words. The test data follows the platform's same-unit counts (pull requests on both sides), so no loop reads more than it should have had. src/lib/openapi-fields.ts is regenerated at coderhelm-platform main now that the draft hold has merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The dashboard shows three new API fields from the platform:
draft_hold, Finished runs never leave their pull request a draft silently coderhelm-platform#501, merged): a finished run whose pull request is still a draft reads "Finished, PR held", both in its status and at the top of the run page. The page shows the summary and each reason with what to do.github_wait, Runs wait out GitHub's limits instead of failing; refused writes are never "no file" coderhelm-platform#499, merged): a working run that is waiting out GitHub's hourly limit says when it continues and that nothing is needed. Before this, the run page didn't show the field.Changes
src/lib/api.ts: addsRunDraftHold,RunDraftHoldReason,draft_holdandgithub_waitonRunDetail, theLearningHealthandLearningLooptypes, andapi.getLearningHealth().src/app/learning/health.tsx(new), placed under the Learning page header as a Section (#health):src/app/runs/detail/page.tsx:draft_holdis shown on needs_input, completed or success runs. It takes the outcome card's place at the top, ahead of the named wait for the same pull request.helduses the waiting tone.waitingalso uses the waiting tone, with the title "Finished, PR held until a check settles".faileduses the attention tone, with the title "Finished, PR held: GitHub refused to mark it ready".github_waitis shown only while the run is live (pending, queued, running, awaiting_ci). A finished run ignores a stale value.src/components/run-status.tsx:RunStatusBadgetakesdraftHoldand reads "Finished, PR held". It uses the attention tone when GitHub refused to mark the pull request ready.src/lib/openapi-fields.tsandsrc/lib/api-contract.ts:de34e9c1), after Require single sign-on: one control, a checklist with real state, consequences once #501 and Reviewer settings: review when labelled or every pull request #502 merged. That document hasdraft_hold,RunDraftHold,RunDraftHoldReasonandgithub_wait.RunDraftHoldandRunDraftHoldReason.e2e/run-draft-hold.spec.ts(new) covers:e2e/learning.spec.tsadds:e2e/wide-dataanswers/api/learning/healthand addsdraft_holdandgithub_waitwith long strings to the wide run. The no-sideways-scroll, readable-text and no-mid-word-breaks specs now cover both.Verification
All of these ran in
dashboard/:npm ci: passed.npm run lint: UI lint passed, no hardcoded hosted addresses.npm run typecheck: clean.npm run check:openapi: matches coderhelm-platform@de34e9c1 (main).npm run build: passed, withNEXT_PUBLIC_API_URLpointed at the e2e server the way CI sets it.E2E_STATIC=1), run the way CI runs it: 1425 passed, 0 failed, 10 skipped.e2e/learning.spec.tsande2e/run-draft-hold.spec.tson their own: 30 passed.